require(["common", "jQuery", "coAjax", "href", "hash_routie"], function(jSouper, $, coAjax, href, hash_routie) {
	hash_routie.on("points", function() {
		coAjax.get(appConfig.user.bus_bind, function(result) {
			console.log(result.result);
			App.set("bus_user_bind", result.result);
		});
	});
	App.set("$Event.user.weishenqingduihuan_to_shenqingduihuanzhong", function(e, vm) {
		if (!App.get("loginer.info.alipay")) {
			alert("warn", "您还未绑定支付宝账号，请到“个人信息”页进行设置，确保兑现顺利进行", 5000)
		};
		coAjax.put(appConfig.user.res_weishenqingduihuan_to_shenqingduihuanzhong, {
			bus_id: vm.get("bus_id")
		}, function(result) {
			console.log(result.result);
			vm.set(result.result);
		});
	});
	App.set("$Event.user.shangjiayijingfukuan_to_yonghuquerenfukuan", function(e, vm) {
		coAjax.put(appConfig.user.res_shangjiayijingfukuan_to_yonghuquerenfukuan, {
			bus_id: vm.get("bus_id")
		}, function(result) {
			console.log(result.result);
			vm.set(result.result);
		});
	});
	App.set("$Event.user.acc_to_BusUser_money", function(e, vm) {
		myPrompt("请输入转现金额额度：", vm.get("_money").toFixed(2), function(money) {
			coAjax.put(appConfig.user.acc_to_BusUser_money, {
				bus_id: vm.get("bus_id"),
				money: money
			}, function(result) {
				vm.set(result.result);
			});
		});
	});
});